<template>
	<!-- 20221018 -->
	<!-- 阻止滑动穿透 -->
	<view class="layer-pop-up-cn" @touchmove.stop.prevent  style="z-index: 99;">
		<!-- 组件内容 -->
		<view class="cn-content">
			<view class="jc-modal" :class="{overlay : overlay}" @tap="overlayClick">
				<slot></slot>
			</view>
		</view>

		<!-- 组件浮层 -->
		<view class="cn-layer">
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			// 是否显示蒙版 false--不显示 true--显示
			overlay: {
				type: Boolean,
				default: true
			}
		},
		methods: {
			/**
			 * 点击蒙版
			 * @date 2022-10-18
			 */
			overlayClick() {
				this.$emit('overlayClick')
			}
		}
	}
</script>

<style scoped>
	.jc-modal {
		background: transparent;
	}

	.jc-modal.overlay {
		background: rgba(0, 0, 0, 0.6);
	}
</style>
